/**
 * @Project Name:hoofungson-elk-log
 * @Package Name:cn.hoofungson.framework.elk.log.util
 * @Since JDK 1.8
 */

package cn.hoofungson.framework.elk.log.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description: 时间工具
 * @Author 胡松 hoofungson@163.com
 * @Date 2019-08-24 10:46
 * @Version V1.0
 */
public class TimeUtils {

    private TimeUtils() {
    }

    /**
     * 将UNIX时间戳转换为yyyy-MM-dd HH:mm:ss.SSS
     *
     * @param timeStamp
     * @return
     **/
    public static String convert(Long timeStamp) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
                .format(new Date(timeStamp));
    }
}
